package top.heliming.leyou.userservice.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.heliming.leyou.userservice.bean.User;
import top.heliming.leyou.userservice.service.UserService;

/**
 * description: //用户服务
 *
 * @author: heliming
 * @date:2019/05/22 下午 10:09
 */
@RestController
@RequestMapping("user")
public class UserController {

  @Autowired
  private UserService userService;

  @GetMapping("/{id}")
  public User queryById(@PathVariable("id") Long id) throws InterruptedException {
    return this.userService.queryById(id);
  }
}
